import Vue from 'vue'

import App from './App.vue'
import router from './router'
import store from "./store/index.js";
import Cookies from "js-cookie";

import "normalize.css/normalize.css"; // a modern alternative to CSS resets

import Element from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

import echarts from "echarts"
import VueCoreVideoPlayer from "vue-core-video-player"
import VueQuillEditor from "vue-quill-editor"
import "quill/dist/quill.core.css"
import "quill/dist/quill.snow.css"
import "quill/dist/quill.bubble.css"


Vue.prototype.$echarts = echarts
Date.prototype.format = function(fmt) {
    let o = {
        "M+": this.getMonth() + 1,
        "d+": this.getDate(),
        "H+": this.getHours(),
        "m+": this.getMinutes(),
        "s+": this.getSeconds(),
        "q+": Math.floor((this.getMonth() + 3) / 3),
        S: this.getMilliseconds()
    };
    if (/(y+)/.test(fmt)) {
        fmt = fmt.replace(
            RegExp.$1,
            (this.getFullYear() + "").substr(4 - RegExp.$1.length)
        );
    }
    for (let k in o) {
        if (new RegExp("(" + k + ")").test(fmt)) {
            fmt = fmt.replace(
                RegExp.$1,
                // @ts-ignore
                RegExp.$1.length === 1
                    ? o[k]
                    : ("00" + o[k]).substr(("" + o[k]).length)
            );
        }
    }
    return fmt;
};

Vue.use(VueCoreVideoPlayer)
Vue.use(VueQuillEditor)

Vue.use(Element, {
    size: Cookies.get("size") || "medium"
});




Vue.config.productionTip = false;
Vue.prototype.$EventBus = new Vue()

import './assets/main.css'

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
